package com.hepinghospital.user.base;


/**
 * This abstract class is about MVP base presenter .
 */
public abstract class MVPBasePresenter<V> {

    /**
     * View interface weak reference
     */
    private V mView;

    void attachView(V view) {
        mView = view;
    }

    protected V getView() {
        return mView;
    }

    public boolean isViewAtteached() {
        return mView != null;
    }

    void detachView() {
        if (null != mView) {
            mView = null;
        }
    }
}
